package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.response.AddressBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MShippingAddressImpl : BaseModel() {
    fun requestUserAddress(baseObserver: BaseObserver<ArrayList<AddressBean>>) {
        val url = ConfigUtil.instance.getUrl(Urls.USER_ADDRESS)
        apiService().userAddress(url)
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}
